<!DOCTYPE html>
<html lang="en" dir="ltr">
    <head>
        <meta charset="utf-8">
        <title>贵州省数据</title>
    </head>
    <body>
        <div id="map" style="width:1600px;height: 800px;"></div>
        <script src="https://img.hcharts.cn/highmaps/highmaps.js"></script>
        <script src="guizhou.js"></script>
        <script>
        // 随机数据
        var data = [
        {"name":"贵阳","value":23},{"name":"六盘水","value":14},{"name":"遵义","value":70},{"name":"安顺","value":5},
        {"name":"毕节","value":28},{"name":"铜仁","value":13},{"name":"黔西南","value":99},{"name":"黔东南","value":97},
        {"name":"黔南","value":83}];
        // 初始化图表
        var map = new Highcharts.Map('map', {
          title: {
            text: '贵州省数据'
          },
          colorAxis: {
            min: 0,
            minColor: 'rgb(0, 255, 127)',
            maxColor: '#006cee'
          },
          series: [{
            data: data,
            animation: true,
            name: '随机数据',
            mapData: Highcharts.maps['cn/guizhou'],
            joinBy: 'name' // 根据 name 属性进行关联
          }]
        });
        </script>
    </body>
</html>
